# Contributor: Aiden Grossman <agrossman154@yahoo.com>
# Maintainer: Aiden Grossman <agrossman154@yahoo.com>
pkgname=py3-fastjsonschema
pkgver=2.15.3
pkgrel=0
pkgdesc="Fast JSON schema validator"
url="https://horejsek.github.io/python-fastjsonschema/"
arch="noarch"
license="BSD-3-Clause"
depends="python3"
checkdepends="py3-pytest py3-pytest-benchmark"
source="$pkgname-$pkgver.tar.gz::https://github.com/horejsek/python-fastjsonschema/archive/refs/tags/v2.15.3.tar.gz"
builddir="$srcdir/python-fastjsonschema-$pkgver"

build() {
	python3 setup.py build
}

check() {
	# first test fails on ppc64le and s390x, rest of disabled tests fail on s390x
	pytest \
		--deselect tests/test_compile_to_code.py::test_compile_to_code_custom_format_with_refs \
		--deselect tests/test_compile_to_code.py::test_compile_to_code_ipv6_regex \
		--deselect tests/test_compile_to_code.py::test_compile_to_code_custom_format
}

package() {
	python3 setup.py install --prefix=/usr --root="$pkgdir"
}

sha512sums="
59dfc513de46e9df790edaa1abc994decdf98d65bec8eb8a6ac7211d2277f4e15d521a308e45c6532a232321d8a4655f87b7a01f2d57b9de20246a4d6deeeb9b  py3-fastjsonschema-2.15.3.tar.gz
"
